<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/common/common.jsp"%>
<%@ include file="/WEB-INF/common/taglib.jsp"%>

<!DOCTYPE html>
<html lang="en">
<head>
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<script type="text/javascript">
		$(function(){
			$('.form_datetime').datetimepicker({
				language:'zh-CN',
				format: "yyyy-mm-dd hh:ii:ss",
				weekStart: 1,
		        autoclose: true,
		        todayBtn: true,
				todayHighlight: 1,
				startView: 'month',
				forceParse: true,
		        showMeridian: 1
			});
		});
	</script>
</head>
<body>
	<div class="container bs-docs-container" style="width:100%;">
		<div class="row">
			<form role="pageForm" class="form-inline" action="<%=path%>/system/sysLog/queryPageList.do" method="post"  id="pageForm" class="form-search">
				<div  class="col-md-12" style="width:100%;padding:5px;">
					<div class="panel panel-default">
						  <div class="panel-heading">列表界面</div>
						  <div class="panel-body">
						  		<div class="search">
									<div class="form-group col-sm-4">
										<label for="type" class="col-sm-4 control-label" style="text-align:left;">日志类型</label>
								 		<div class="col-sm-8">
								 			<input type="text" name="type" id="type" placeholder="日志类型" value="${sysLog.type}" class="form-control">
						           		</div>
						            </div>
									<div class="form-group col-sm-4">
										<label for="title" class="col-sm-4 control-label" style="text-align:left;">日志标题</label>
								 		<div class="col-sm-8">
								 			<input type="text" name="title" id="title" placeholder="日志标题" value="${sysLog.title}" class="form-control">
						           		</div>
						            </div>
								 	<div class="form-group col-sm-4 ">
				     			 		<button type="submit" class="btn btn-sm btn-primary col-md-offset-1">搜索</button>
				       			 	</div>
						  		</div>
						        <div class="col-md-12 col-sm-12 col-xs-12 table-responsive"  style="padding-top: 5px;">
						        <table class="table table-striped table-condensed">
							        <thead>
							        	<tr class="active">
							        		<th style="width:5%;">序号</th>
											<th style="width:5%;">日志类型</th>
											<th style="width:5%;">日志标题</th>
											<th	style="width:5%;">操作IP地址</th>
											<th style="width:5%;">操作方式</th>
											<th style="width:5%;">创建者</th>
											<th style="width:5%;">创建时间</th>
				                			<th style="width:5%;">操作</th>
			                			</tr>
							        </thead>
							        <tbody>
									        <c:choose>
												<c:when test="${not empty pagination}">
													<c:forEach items="${pagination.items}" var="info" varStatus="vs">
														<tr>
															<td>${vs.index+1}</td>
															<td>${info.type}</td>
															<td>${info.title}</td>
															<td>${info.remoteAddr}</td>
															<td>${info.method}</td>
															<td>${info.createUser}</td>
															<td>
																<fmt:formatDate value="${info.createDate}" type="date"  pattern="yyyy-MM-dd HH:mm:ss"/>
															</td>
															<td class="last">
																<a href="<%=path%>/system/sysLog/toDetail.do?id=${info.id}">详情</a>
															</td>
														</tr>
													</c:forEach>
												</c:when>
												<c:otherwise>
														<tr><td colspan="100">没有相关数据</td></tr>
												</c:otherwise>
											</c:choose>
							         </tbody>
							    </table>
							    </div>
								<div>
									<%@ include file="/WEB-INF/common/pagination.jsp"%>
								</div>
						  </div>	
					</div>
				</div>  
			</form>
		</div>
	</div>
</body>
</html>